home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Vampire the Masquerade / vampire_demo.exe / Codex.nob / funcBreakable.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  2.1 KB  |  67 lines

  1. public class funcBreakable extends Codex {
  2.    private CodexThing _gib1;
  3.    private CodexThing _gib2;
  4.    private CodexThing _gib3;
  5.    private CodexThing _gib4;
  6.    private CodexThing _gib5;
  7.    private float[] velocity = new float[3];
  8.    public static String[] _params = new String[]{"Gib 1", "Gib 2", "Gib 3", "Gib 4", "Gib 5", "Velocity X", "Velocity Y", "Velocity Z"};
  9.  
  10.    public void beginscene(int clientGuid, int captureID) {
  11.       float[] tempVel = new float[3];
  12.       tempVel[0] = this.velocity[0];
  13.       tempVel[1] = this.velocity[1];
  14.       tempVel[2] = this.velocity[2];
  15.       this._gib1.SetVelocity(tempVel);
  16.       this._gib1.SetMoveType(0);
  17.       tempVel[0] = this.velocity[0];
  18.       tempVel[1] = this.velocity[1];
  19.       tempVel[2] = this.velocity[2];
  20.       this._gib2.SetVelocity(tempVel);
  21.       this._gib2.SetMoveType(0);
  22.       tempVel[0] = this.velocity[0];
  23.       tempVel[1] = this.velocity[1];
  24.       tempVel[2] = this.velocity[2];
  25.       this._gib3.SetVelocity(tempVel);
  26.       this._gib3.SetMoveType(0);
  27.       tempVel[0] = this.velocity[0];
  28.       tempVel[1] = this.velocity[1];
  29.       tempVel[2] = this.velocity[2];
  30.       this._gib4.SetVelocity(tempVel);
  31.       this._gib4.SetMoveType(0);
  32.       tempVel[0] = this.velocity[0];
  33.       tempVel[1] = this.velocity[1];
  34.       tempVel[2] = this.velocity[2];
  35.       this._gib5.SetVelocity(tempVel);
  36.       this._gib5.SetMoveType(0);
  37.    }
  38.  
  39.    public void triggered(int triggeredGUID, int triggererGUID, int triggerID, float p0, float p1, float p2, float p3, int captureID) {
  40.       this._gib1.SetMoveType(3);
  41.       this._gib2.SetMoveType(3);
  42.       this._gib3.SetMoveType(3);
  43.       this._gib4.SetMoveType(3);
  44.       this._gib5.SetMoveType(3);
  45.    }
  46.  
  47.    public funcBreakable(CodexThing gib1, CodexThing gib2, CodexThing gib3, CodexThing gib4, CodexThing gib5, float velX, float velY, float velZ) {
  48.       float[] offset = new float[3];
  49.       offset[0] = 0.0F;
  50.       offset[1] = 0.0F;
  51.       offset[2] = 0.0F;
  52.       this._gib1 = new CodexThing(((Codex)gib1).GetGUID());
  53.       this._gib2 = new CodexThing(((Codex)gib2).GetGUID());
  54.       this._gib3 = new CodexThing(((Codex)gib3).GetGUID());
  55.       this._gib4 = new CodexThing(((Codex)gib4).GetGUID());
  56.       this._gib5 = new CodexThing(((Codex)gib5).GetGUID());
  57.       this.velocity[0] = velX;
  58.       this.velocity[1] = velY;
  59.       this.velocity[2] = velZ;
  60.       ((Codex)this).CaptureThing(this._gib1.GetGUID());
  61.       ((Codex)this).CaptureThing(this._gib2.GetGUID());
  62.       ((Codex)this).CaptureThing(this._gib3.GetGUID());
  63.       ((Codex)this).CaptureThing(this._gib4.GetGUID());
  64.       ((Codex)this).CaptureThing(this._gib5.GetGUID());
  65.    }
  66. }
  67.